package com.lhc.service;

import com.lhc.error.BusniessException;
import com.lhc.service.model.ItemModel;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface ItemService {
    //创建商品
    ItemModel createItem(ItemModel itemModel) throws BusniessException;

    //商品列表浏览
    List<ItemModel> listItem();

    //商品详情浏览
    ItemModel getItemById(Integer id);

    //落单减库存
    boolean decreaseStock(Integer itemId,Integer account);
}
